// 定义分类相关api接口
import request from '@/utils/request'

/**
 * 获取首页头部分类数据
 */
export const findAllCategory = () => {
  return request('/home/category/head', 'get')
}

// 获取顶级分类信息（children属性）
export const findTopCategory = (id) => {
  return request('/category', 'get', { id })
}

// 二级类目信息(筛选条件)
export const findSubCategoryFilter = (id) => {
  return request('/category/sub/filter', 'get', { id })
}

// 获取二级类目下的商品
export const findSubCategoryGoods = (params) => {
  return request('/category/goods/temporary', 'post', params)
}
